// SRM相关数据api
import request from '@/utils/request'
import { srmService } from '@/utils/request'

/**
 * 新增供应商
 */
export const AddSupplier = (data) => request({
  method: 'post',
  url: '/SRM/Supplier/Add',
  data
})

/**
 * 删除供应商
 */
export const DeleteSupplier = (data) => request({
  method: 'delete',
  url: '/SRM/Supplier/Delete',
  data
})

/**
 * 更新供应商
 */
export const UpdateSupplier = (data) => request({
  method: 'put',
  url: '/SRM/Supplier/Update',
  data
})

/**
 * 查询供应商 全部
 */
export const getSupplierAll = (data) => request({
  method: 'get',
  url: '/SRM/Supplier/SelectAll',
  data
})

/**
 * 查询供应商 分页
 */
export const getSupplier = (data) => request({
  method: 'post',
  url: '/SRM/Supplier/Pagion',
  data
})

/**
 * 新增email
 */
export const AddEmail = (data) => request({
  method: 'post',
  url: '/SRM/Email/Add',
  data
})

/**
 * 更新email
 */
export const UpdateEmail = (data) => request({
  method: 'put',
  url: '/SRM/Email/Update',
  data
})

/**
 * 更新email
 */
export const DeleteEmail = (data) => request({
  method: 'delete',
  url: '/SRM/Email/Delete',
  data
})

/**
 * 分页查询Email
 */
export const getEmail = (data) => request({
  method: 'post',
  url: '/SRM/Email/SelectByPage',
  data
})

/**
 * 发送Email
 */
export const SendEmail = (data) => request({
  method: 'post',
  url: '/SRM/Email/Send',
  data
})

/**
 *
 */
export const Bidding = (data) => request({
  method: 'post',
  url: '/SRM/Bid/Bidding',
  data
})

/**
 * 查询Bid
 */
export const GetBid = (data) => request({
  method: 'post',
  url: '/SRM/Bid/SelectByPage',
  data
})

/**
 * 更新Bid
 */
export const UpdateBid = (data) => request({
  method: 'put',
  url: '/SRM/Bid/Update',
  data
})

/**
 * 删除投标
 */
export const DeleteBid = (data) => request({
  method: 'delete',
  url: '/SRM/Bid/Delete',
  data
})

/**
 * 招标
 */
export const InvitePublish = (data) => request({
  method: 'post',
  url: '/SRM/Invite/Publish',
  data
})

/**
 * 招标列表
 */
export const InviteGet = (data) => request({
  method: 'post',
  url: '/SRM/Invite/Get',
  data
})
/**
 * 招标列表
 */
export const InviteGetList = (data) => request({
  method: 'get',
  url: '/SRM/Invite/GetList',
  data
})

/**
 * 更新招标列表
 */
export const InviteUpdate = (data) => request({
  method: 'put',
  url: '/SRM/Invite/Update',
  data
})

/**
 * 上传文件 AddFile
 */
export const AddFile = (data) => request({
  method: 'post',
  url: '/SRM/Invite/AddFile',
  data
})

/**
 * 删除DeleteFileInfo
 */
export const DeleteFileInfo = (data) => request({
  method: 'post',
  url: '/SRM/Invite/RemoveFile',
  data
})

/**
 * 删除招标
 */
export const InviteDelete = (data) => request({
  method: 'delete',
  url: '/SRM/Invite/Delete',
  data
})

/**
 * Invite
 */
export const LinkMail = (data) => request({
  method: 'put',
  url: '/SRM/Invite/LinkMail',
  data
})

/**
 * 招标分页
 */
export const InvitePagion = (data) => request({
  method: 'post',
  url: '/SRM/Invite/Pagion',
  data
})

/**
 * 查询文件
 */
export const GetFileById = (data) => request({
  method: 'post',
  url: '/File/GetById',
  data
})

/**
 * 获取文件
 */
export const GetFile = (data) => request({
  method: 'post',
  url: '/File/Get',
  data
})

/**
 * 提醒
 */
export const SendInviteMail = (data) => request({
  method: 'post',
  url: '/SRM/Mail/SendInviteMail',
  data
})

/**
 * 进入下一轮
 */
export const IntoNextRound = (data) => request({
  method: 'post',
  url: '/SRM/Invite/IntoNextRound',
  data
})

/**
 * 开Bid
 */
export const IntoNext = (data) => request({
  method: 'post',
  url: '/SRM/Bid/IntoNext',
  data
})

/**
 * 关Bid
 */
export const CancelNext = (data) => request({
  method: 'post',
  url: '/SRM/Bid/CancelNext',
  data
})

/**
 * Negotiation
 */
export const Negotiation = (data) => request({
  method: 'post',
  url: '/SRM/Invite/Negotiation',
  data
})

/**
 * 退回招标
 */
export const GobackLastGround = (data) => request({
  method: 'post',
  url: '/SRM/Invite/GobackLastGround',
  data
})

/**
 * 确认中标
 */
export const ConfirmBid = (data) => request({
  method: 'post',
  url: '/SRM/Bid/ConfirmBid',
  data
})

/**
 * 最终报价
 */
export const FinalSubmit = (data) => request({
  method: 'post',
  url: '/SRM/Bid/FinalSubmit',
  data
})

/**
 * 最终报价
 */
export const EndMethod = (data) => request({
  method: 'post',
  url: '/SRM/Invite/EndMethod',
  data
})

/**
 * 获取供应商分组
 */
export const GetSupplyGroup = (data) => request({
  method: 'get',
  url: '/SRM/Supplier/GetSupplyGroup',
  data
})

